efa policy prefix-list create

Creates a prefix list.

Syntax

efa policy prefix-list create [ --type string | --name list name | --rule stringArray ]

Parameters

--type string
Specifies the type of prefix list. Valid types are ipv4 and ipv6 .
--name list name
Specifies the name of the prefix list.
--rule stringArray
Specifies the rule of the prefix list, in the following format: seq[seq-num], action[permit/deny], prefix[IPv4 prefix|IPv6 prefix],ge[prefix-len],le[prefix-len]. Example: seq [5], action[permit], prefix [10.0.0.0/8|2001:db8: :/32],ge[10], le[24] .

Usage Guidelines

Execute efa policy prefix-list update --operation add-device to push the configuration on to the device.

Examples

This example creates an IPv4 prefix list.

$ efa policy prefix-list create –-name prefix_v4 
–-type ipv4 –-rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16]

This example creates an IPv4 prefix list with two rules.

efa policy prefix-list create --type ipv4 
--name test1 --rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16],le[24] 
--rule seq[10],action[deny],prefix[20.0.0.0/8],ge[14],le[24]
Name: test1
+------+---------+--------+------------+----+----+---------+
| Type | Seq num | Action |   Prefix   | Ge | Le | Status  |
+------+---------+--------+------------+----+----+---------+
| ipv4 | 5       | permit | 10.0.0.0/8 | 16 | 24 | Success |
+------+---------+--------+------------+----+----+---------+
| ipv4 | 10      | deny   | 20.0.0.0/8 | 14 | 24 | Success |
+------+---------+--------+------------+----+----+---------+
Prefix-list details
--- Time Elapsed: 597.965605ms ---
			
This example creates an IPv6 prefix list.
efa policy prefix-list create --type ipv6 --name prefix_1_in 
–rule "seq[11], action[permit], prefix[2001:db8::/48]" 
 

Name: prefix_1_in 
+------+---------+--------+---------------+----+----+---------+ 
| Type | Seq num | Action |    Prefix     | Ge | Le | Status  | 
+------+---------+--------+---------------+----+----+---------+ 
| ipv6 | 11      | permit | 2001:db8::/48 |    |    | Success | 
+------+---------+--------+---------------+----+----+---------+ 
Prefix-list details